package com.wmh.baseservice.skd.mapper;

import com.wmh.baseservice.skd.pojo.SkdLeaderInfo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wmh.baseservice.skd.pojo.vo.FollowGroupNumAndBrowseNumRespVO;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
* @author CH
* @description 针对表【skd_leader_info】的数据库操作Mapper
* @createDate 2023-12-10 17:50:01
* @Entity com.wmh.baseservice.skd.pojo.SkdLeaderInfo
*/
public interface SkdLeaderInfoMapper extends BaseMapper<SkdLeaderInfo> {

    /**
     * 根据团购活动id查询团信息
     * @param groupBuyingActivityId 团购商品id
     * @return 返回代理商信息
     */
    SkdLeaderInfo selectByGroupBuyingActivityId(Long groupBuyingActivityId);

    Integer getGroupNoNyId(Long leaderId);

    /**
     * 根据团购活动id查询跟团人数和浏览人数
     * @param id 团购活动id
     * @return 返回跟团人数和浏览人数团信息响应体
     */
    FollowGroupNumAndBrowseNumRespVO selectFollowGroupNumAndBrowseNumByGroupBuyingActivityId(Long id);

    @Update("UPDATE skd_leader_info SET deleted = 0 WHERE id = #{id}")
    boolean recover(Long id);
}




